#ifndef GUI_H
#define GUI_H

#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <cstdlib>
#include <iostream>

#include "../utils/MyFloat.h"
#include "Camera.h"

/**
 * @class GUI
 * @brief GUI is responsible for interactions with the user
 *
 * Description:
 *  GUI is responsible for creating and managing screen limits and displays
 *  GUI is responsible for getting the users inputs. The class
 *  is implemented as a singleton and should be used by calling
 *  the static function instance() to instanciate the class.
 *  The constructor is private.
 */
class GUI
{
private:
  /**
   * Empty Constructor
   */
  GUI ( );

  SDL_Event event; /**< SDL events such as users keyboard input */
  MyFloat XMIN;   /**< position limit when moving screen */
  MyFloat YMIN;   /**< position limit when moving screen */
  MyFloat XMAX; /**< position limit when moving screen */
  MyFloat YMAX;  /**< position limit when moving screen */
  unsigned int screenXmin ; /**< screen resolution */
  unsigned int screenYmin ; /**< screen resolution */
  unsigned int screenXmax ; /**< screen resolution */
  unsigned int screenYmax ; /**< screen resolution */
  Camera* camera;

public:
  virtual ~GUI ( );

  /**
   * @brief Interaction with user's input
   * @return a pointer on a singleton instance of the class
   *
   * Description:
   * This function should be used to create a single instace of the class
   */
  static GUI* instance ( );

  /**
   */
  void chooseMaterial ( );

//	void createLink (Node node )

  /**
   * @brief Interaction with user's input
   * @return false when user request to quit the application
   *
   * Description:
   * Get users input from keyboard and lauch appropriate functions
   */
  bool getUserActions ();

protected:
  static GUI* instance_ptr ;  /**< pointer to the unique instance of the class */

};

#endif // GUI_H
